The invention relates to effecting video transitions between video streams.
In editing of video in the creation of a video program, it is often desirable to provide a gradual transition from one video stream to another video stream. For example, in a wipe transition, a line may move across the screen from left to right, with the old scene gradually disappearing at the right while more and more of the new scene appears at the left. In a so-called xe2x80x9ciris wipe,xe2x80x9d the boundary is an expanding circle, and one video stream appears in an expanding circle, and the other is outside of the circle.
Referring to FIG. 1, transitions can be created at a video combiner 10 having a first video input 12 for a first video stream, a second video input 14 for a second video stream, a key input 16 to receive key values indicating how the two inputs are to be combined, and a video output 18 for the output video that is some combination of the two inputs. The video streams include frames (each frame providing an image for a screen) made up of horizontal lines, each of which includes individual xe2x80x9cpixelsxe2x80x9d (picture elements) across the line. Each pixel value includes a number of bits that describe the color and intensity at that particular pixel at a particular time. New frames are provided at the video rate, e.g., 30 frames per second, and the first, second and output video streams include sequential digital data describing sequential pixel values for lines of video data in a frame. The pixels for the first and second video streams that are input to combiner 10 are synchronized, as are the associated key values. The key value for a given pixel indicates whether the output for that pixel is the input from one stream or the other stream or a combination of the two.
Typically, the keys are generated based on an x,y table of gamma values, one gamma value corresponding to each of x pixels in y lines of the frame, with the value indicating the time at which the transition appears at that pixel. FIG. 2 is a simplified diagram (a frame has hundreds of lines and hundreds of pixels in each line) of table 20 of gamma values for an iris wipe. As the time goes from frames 1 to 2 to 3 to 4 to 5 etc, the diameter of the iris transition expands. The key values that are generated from the table cause a switchover at the transition from one video input to the other. xe2x80x9cSoftnessxe2x80x9d is added to the key values generated so that the switchover is not abrupt but instead is gradual as the transition passes a pixel location. The extent of softness is typically fixed by the hardware, and not subject to change.
The invention features, in general, combining first and second video streams into a combined output video stream. A first transition proximity map listing proximity values for pixels in a video frame made up of lines of pixels is input to a processor; each proximity value indicates a distance from a pixel to a video transition. A mapping function is then applied to convert each proximity value to a key value indicating the relative amount of the first and second video stream to be included in a combined output video stream. The pixel values of the first and second video streams are then combined based upon respective key values.
Particular embodiments of the invention may include one or more of the following features. One or more additional proximity maps are used to generate key values at different times. Additional transition proximity maps are interpolated (e.g., by linear interpolation) from the first and second transition proximity maps. The combining is carried out at a video combiner having an input for the first video stream, an input for the second video stream, an input for the key values, and a video output.
Embodiments of the invention may include one or more of the following advantages. Transition proximity maps can be easily created and modified, permitting flexibility it creating transitions. The proximity values can have sufficient bits (e.g., 2 to 8 bits) to define fractions of pixels, permitting a higher resolution and smoother, more gradual transitions than with gamma values. A relatively small number of transition proximity maps can be generated ahead of time, and the interpolated tables can be generated on the fly during editing. The softness can also easily be varied to have gradual softness or an abrupt change at the transition by using a different look-up table at a processor that performs the mapping function.
Other advantages and features of the invention will be apparent from the following description of the preferred embodiment and the claims.